package network

import "net"

const (
	IMAPERIOD	= 100
	IMALOSS		= 4
	ALIVEWATCH	= 10
	NETSETUP	= 200
	WRITEDL		= 10
	READDL		= 10
)

var (
	bcast   = "129.241.187.255"
	LOCALIP = GetMyIP()
	UDPport = "9001"
	TCPport = "9191"
)

type connMap struct {
	tcpMap map[string]connChans
}

type connChans struct{
	send chan Mail
	quit chan bool
}

type tcpConnection struct {
	ip     string
	socket net.Conn
	sendChan chan Mail
	quit chan bool
}

type Mail struct {
	IP  string
	Msg []byte
}
